<template>
  <div class="enls">
    <van-nav-bar
      title="我的申请"
      left-text=""
      left-arrow
      @click-left="onClickLeft"
    />
    <van-tabs router color="#f86612" v-model="active">
      <van-tab to="/enlist/eenlist" title="全部"></van-tab>
      <van-tab title="已报名" to="/enlist/ebaoming"></van-tab>
      <van-tab title="已录用" to="/enlist/eluyong"></van-tab>
      <van-tab title="已到岗" to="/enlist/edaogang"></van-tab>
      <van-tab title="已结算" to="/enlist/ejiesuan"></van-tab>
    </van-tabs>
    <router-view />
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    };
  },
  mounted() {
    //console.log(this.$route.path);
    if (this.$route.path == "/enlist/ebaoming") {
      this.active = 1;
    }
    if (this.$route.path == "/enlist/eluyong") {
      this.active = 2;
    }
    if (this.$route.path == "/enlist/edaogang") {
      this.active = 3;
    }
    if (this.$route.path == "/enlist/ejiesuan") {
      this.active = 4;
    }
  },
  methods: {
    onClickLeft() {
      /* Toast('返回'); */
      //this.$router.back()
      //this.$router.go(-1)
      this.$router.push("/home/my");
    },
  },
};
</script>

<style lang="scss">
.enls {
  .van-tabs__wrap {
    height: 90px;
  }
  .van-tabs__nav--card {
    height: 80px;
  }
  .van-nav-bar .van-icon {
    color: #000000;
  }
  .van-nav-bar__content {
    height: 100px;
  }
  .van-nav-bar__arrow {
    font-size: 45px;
  }
  .van-nav-bar__title {
    font-size: 32px;
  }
  .van-ellipsis {
    overflow: unset;
  }

  .van-tab__text--ellipsis {
    overflow: unset;
  }
  .van-tab {
    font-size: 30px;
  }
  .van-tabs__line {
    width: 86px;
    height: 16px;
    border-radius: 15px;
    background-color: rgb(251 200 5 / 66%) !important;
  }
  .van-tabs--line .van-tabs__wrap {
    height: 60px;
  }
  .van-tabs__wrap {
    margin-left: 0;
  }
}
</style>
